package com.epro.dx.util;

import android.graphics.Bitmap;

import com.epro.dx.R;
import com.nostra13.universalimageloader.core.DisplayImageOptions;

public class ImageLoaderUtils {

	public static DisplayImageOptions getImageLoaderOptions(int defaultResId,int failResIds) {
		// 显示图片的配置
		DisplayImageOptions options = new DisplayImageOptions.Builder()
				.showImageOnLoading(defaultResId)
				.showImageOnFail(failResIds).cacheInMemory(true)
				.cacheOnDisk(true).bitmapConfig(Bitmap.Config.RGB_565).build();
		return options;
	}
	
	public static DisplayImageOptions getImageLoaderOptionsCart(int defaultResId,int failResIds) {
		// 显示图片的配置
		DisplayImageOptions options = new DisplayImageOptions.Builder()
//				.showImageOnLoading(defaultResId)
				.showImageOnFail(failResIds).cacheInMemory(true)
				.cacheOnDisk(true).bitmapConfig(Bitmap.Config.RGB_565).build();
		return options;
	}
}
